/**
 * ISWE.
 * Created on : 16/07/2009
 *
 * Copyright (c) 2009 ISWE.
 * Rafael Noronha de Almeida
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of Rafael Noronha de Almeida
 * ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Rafael.
 */
package br.com.iswe.recipemaster.entities.core;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;

import br.com.iswe.core.entidades.annotation.GeradorConfig;
import br.com.iswe.core.entidades.annotation.SecurityStrategyType;
import br.com.iswe.recipemaster.entities.BaseEntity;

/**
 *
 * Description: 
 *
 * @author Rafael Noronha de Almeida
 *
 * @version $Revision: 1.4 $ $Date: 2009/07/28 10:34:55 $
 *
 */
@Entity
@GeradorConfig(securityStrategy = SecurityStrategyType.ACEGI_ISWE_INTEGRATION)
public class Recipe extends BaseEntity {

	private Long 				recipeId;
	private String 				name;	
	private String 				description;
	private List<Ingredient> 	ingredientList;

	/**
	 * @return the recipeId
	 */
	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
	public Long getRecipeId() {
		return recipeId;
	}
	public void setRecipeId(Long recipeId) {
		this.recipeId = recipeId;
	}

	/**
	 * @return the name
	 */
	@Column(length=255)
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}
	/**
	 * @param description the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}
	
	
	/**
	 * @return the ingredientList
	 */
	@OneToMany (targetEntity=Ingredient.class, mappedBy="recipe")
	public List<Ingredient> getIngredientList() {
		return ingredientList;
	}
	public void setIngredientList(List<Ingredient> ingredientList) {
		this.ingredientList = ingredientList;
	}
}
